<?php
namespace Health\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;

use Auth;

class Admin extends Authenticatable
{

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'admin'; //用户信息表

    protected $primaryKey = 'id';

    public $timestamps = false;

    protected $guarded = array();

    protected static function updateLoginInfo($ip){
        self::where('id',Auth::user()->id)->update(['last_login_time'=>date('Y-m-d H:i:s'),'last_login_ip'=>$ip]);
    }

}

